<!-- 分页链接 -->
{% if paginator.total_pages > 1 %}
<div class="log pagination">
  <span class="log menu">

    {% if paginator.previous_page %}
      <a class="log button" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">上一页</a>
    {% endif %}
    {% for page in (1..paginator.total_pages) %}
      {% if page == paginator.page %}
        {% if page == 1 %}
          <a class="log button active">{{ page }}</a>
        {% else %}
          <a class="log button segm active">{{ page }}</a>
        {% endif %}
      {% elsif page == 1 %}
        <a class="log button segm" href="{{ site.baseurl | replace: '//', '/' }}"> 1 </a>
      {% else %}
        <a class="log button segm" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
      {% endif %}
    {% endfor %}

    {% if paginator.next_page %}
      <a class="log button segm" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">下一页</a>
    {% endif %}
  </span>
</div>

{% endif %}
